import { get } from 'dot-prop';

export function formatTable(data = {}) {
    return {
        data: get(data, 'data', []),
        size: get(data, 'pageSize', 20) || 20,
        total: get(data, 'total', 0),
        current: get(data, 'currentPage', 0),
    };
}